Code Snippets are closely related to Templates, but instead of defining the content of an entire note, a snippet is a reusable piece of code that can easily be inserted into a Code note.
In the Note Tree:
Then simply type the desired code into the note and set the correct language mode.
The note's title becomes the title of the snippet. Optionally, you can add a description in the Promoted Attributes section.
To insert a snippet, type /snippet and select
its title from the dropdown.